package com.group.eams.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.group.eams.pojo.dto.PermissionQueryDto;
import com.group.eams.pojo.entity.Permission;
import com.group.eams.pojo.vo.PermissionListVo;
import com.group.eams.service.PermissionService;
import com.group.eams.mapper.PermissionMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 恩哲欣
* @description 针对表【permission(权限表)】的数据库操作Service实现
* @createDate 2024-10-29 16:09:34
*/
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission>
implements PermissionService{

    @Override
    public Page<PermissionListVo> findPermissionByQueryDto(Page page, PermissionQueryDto permissionQueryDto) {
        return getBaseMapper().findPermissionByQueryDto(page,permissionQueryDto);
    }

    @Override
    public List<Permission> findPermissionIdRoleId(Long roleId) {
        return getBaseMapper().findPermissionIdRoleId(roleId);
    }

    @Override
    public List<Permission> findPermissionByUserId(Long userId) {
        return getBaseMapper().findPermissionByUserId(userId);
    }
}
